Carbon


CalcMask

Header: Quickdraw.h Carbon status: Supported

Determines where filling will not occur when filling from the outside of a rectangle.

void CalcMask (
    const void *srcPtr, 
    void *dstPtr, 
    SInt16 srcRow, 
    SInt16 dstRow, 
    SInt16 height, 
    SInt16 words
);
Parameter descriptions
srcPtr

A pointer to the source bit image.

dstPtr

A pointer to the destination bit image.

srcRow

Row width of the source bitmap.

dstRow

Row width of the destination bitmap.

height

Height (in pixels) of the fill rectangle.

words

Width (in words) of the fill rectangle.

DISCUSSION

The CalcMask function produces a bit image with 1’s in all pixels to which paint could not flow from any of the outer edges of the rectangle. Use this bit image as a mask with the CopyBits or CopyMask function. A hollow object produces a solid mask, but an open object produces a mask of itself.

As with the SeedFill function, point to the bit image you want to fill with the srcPtr parameter, which can point to the image’s base address or a word boundary within the image. Specify a pixel height and word width with the height and words parameters to define a fill rectangle that delimits the area you want to fill. The fill rectangle can be the entire bit image or a subset of it. Point to a destination image with the dstPtr parameter. Specify the row widths of the source and destination bitmaps (their rowBytes values) with the srcRow and dstRow parameters. (The bitmaps can be different sizes, but they must be large enough to contain the fill rectangle at the origins specified by srcPtr and dstPtr.)

Calls to CalcMask are not clipped to the current port and are not stored into QuickDraw pictures.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)